package com.cdtye.itps.cms.controller.track;

import com.cdtye.common.webcore.web.AjaxJson;
import com.cdtye.itps.cms.dao.track.vo.JcTrackVo;
import com.cdtye.itps.cms.service.track.JcTrackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 股道 前端控制器
 * @author Jchen
 * @date 2021-07-08
 */
@Api(tags="股道接口")
@RestController
@RequestMapping("/track")
public class JcTrackController {
    @Autowired
    private JcTrackService modelService;

    /**
     * 股道列表
     * @param vo
     * @return
     */
    @ApiOperation("股道列表")
    @GetMapping("/getList")
    AjaxJson getList(JcTrackVo vo){
        return AjaxJson.success(modelService.getList(vo));
    }


    /**
     * 根据tackerIdList获取股道
     * @param vo
     * @return
     */
    @ApiOperation("根据tackerIdList获取股道")
    @GetMapping("/getTrackInfoByTrackIdList")
    AjaxJson getTrackInfoByTrackIdList(JcTrackVo vo){
        return AjaxJson.success(modelService.getTrackInfoByTrackIdList(vo));
    }


    /**
     * 根据tackerId获取股道
     * @param trackId
     * @return
     */
    @ApiOperation("根据tackerId获取股道")
    @GetMapping("/getTrackById")
    AjaxJson getTrackById(String  trackId){
        return AjaxJson.success(modelService.getTrackById(trackId));
    }



}
